﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Configuration;
using System.ServiceModel;
using System.ServiceModel.Configuration;


namespace LPNRTool
{
    public class ConfigHelper
    {
        public static string connectionString = "";

        public static string GetConnectionStringConfig(string connectionName)
        {
            //指定config 文件读取
            connectionString = ConfigurationManager.ConnectionStrings[connectionName].ConnectionString;
            return connectionString;

        }
    }

    //public class TheKeyValue : ConfigurationElement    // 集合中的每个元素
    //{    
    //  [ConfigurationProperty("key", IsRequired = true)]    
    //  public string Key    
    //  {
    //        get { return this["key"].ToString(); }
    //        set { this["key"] = value; }    
    //  }

    //    [ConfigurationProperty("value", IsRequired = true)]    
    //  public string Value
    //    {        
    //    get { return this["value"].ToString(); }
    //        set { this["value"] = value; }    }
    //  }
    //}
}
